version: '3'
services:
  odoo:
    build:
      context: ./odoo
    depends_on:
      - db
      - wdb
    ports:
      - "8069:8069"
      - "8072:8072"
    environment:
      - WDB_NO_BROWSER_AUTO_OPEN=True
      - WDB_SOCKET_SERVER=wdb
      - WDB_WEB_PORT=1984
      - WDB_WEB_SERVER=localhost
    volumes:
      - odoo-web-data:/var/lib/odoo
      - ./src/server:/opt/odoo:rw,z
      - ./utils:/opt/utils:rw,z
      - ./etc:/etc/odoo:ro,z
      - ./src/repos:/mnt/repos:rw,z
  db:
    image: postgres:9.4-alpine
    ports:
      - "5050:5432"
    environment:
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_USER=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - odoo-db-data:/var/lib/postgresql/data/pgdata
  wdb:
    build:
      context: ./wdb
    ports:
      - "1984:1984"
volumes:
  odoo-web-data:
  odoo-db-data:
